﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooFrameworkCoreSingletonMono_1_WorldMapBaseTilePoolWorldDynamicPoolMgr_Wrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>);
			Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsInitialized", _m_IsInitialized);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Initialize", _m_Initialize);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Dispose", _m_Dispose);
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 2, 1, 1);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "GetInstance", _m_GetInstance_xlua_st_);
            
			
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "p_IsInitialize", _g_get_p_IsInitialize);
            
			Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "p_IsInitialize", _s_set_p_IsInitialize);
            
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr> does not have a constructor!");
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr> does not have a constructor!");
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetInstance_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)) 
                {
                    string _objName = LuaAPI.lua_tostring(L, 1);
                    
                        var gen_ret = Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.GetInstance( _objName );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                if(gen_param_count == 0) 
                {
                    
                        var gen_ret = Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.GetInstance(  );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.GetInstance!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_IsInitialized(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr> gen_to_be_invoked = (Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                        var gen_ret = gen_to_be_invoked.IsInitialized(  );
                        LuaAPI.lua_pushboolean(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Initialize(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr> gen_to_be_invoked = (Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& translator.Assignable<Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.Options>(L, 2)) 
                {
                    Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.Options _options = (Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.Options)translator.GetObject(L, 2, typeof(Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.Options));
                    
                    gen_to_be_invoked.Initialize( _options );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 1) 
                {
                    
                    gen_to_be_invoked.Initialize(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.Initialize!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Dispose(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr> gen_to_be_invoked = (Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.Dispose(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_p_IsInitialize(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.lua_pushboolean(L, Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.p_IsInitialize);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_p_IsInitialize(RealStatePtr L)
        {
		    try {
                
			    Yoozoo.Framework.Core.SingletonMono<WorldMapBase.Tile.Pool.WorldDynamicPoolMgr>.p_IsInitialize = LuaAPI.lua_toboolean(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
